import Data.Char

concatenatedDecimal = concat $ map show [0..]

euler_040 :: Int
euler_040 = readC((concatenatedDecimal !! 1)) * 
	readC((concatenatedDecimal !! 10)) *
	readC((concatenatedDecimal !! 100)) *
	readC((concatenatedDecimal !! 1000)) *
	readC((concatenatedDecimal !! 10000)) *
	readC((concatenatedDecimal !! 100000)) *
	readC((concatenatedDecimal !! 1000000))
		where
			readC x = ord x - ord '0'